cea3bb16493ca95d11fa6bbc1f65089df6fc882b,processor/src/main/java/org/derive4j/processor/OtherwiseMatchingStepDerivator.java,OtherwiseMatchingStepDerivator,otherwiseLeftMethod,#AlgebraicDataType#EitherModel#,112
Before Change
visitorType, visitorParam, arg))
.functionsDispatch(
constructors -> functionsDispatchEitherImpl(f0, eitherModel, eitherTypeName, adt, constructors, arg)))
.otherwise(() -> {
throw new IllegalArgumentException();
})
.apply(adt.dataConstruction()))
.build(), MethodSpec.methodBuilder(otherwiseLeftMethodName + '_')
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addTypeVariable(leftTypeVarName)
After Change
.addTypeVariable(leftTypeVarName)
.addParameter(ParameterizedTypeName.get(ClassName.get(f0), leftTypeVarName), arg)
.returns(returnType)
.addCode(caseOf(adt.dataConstruction())
.multipleConstructors(MultipleConstructorsSupport.cases()
.visitorDispatch(
(visitorParam, visitorType, constructors) -> visitorDispatchEitherImpl(f0, eitherModel, eitherTypeName, adt,
visitorType, visitorParam, arg))
.functionsDispatch(
constructors -> functionsDispatchEitherImpl(f0, eitherModel, eitherTypeName, adt, constructors, arg)))
.otherwise(() -> {
throw new IllegalArgumentException();
}))
.build(), MethodSpec.methodBuilder(otherwiseLeftMethodName + '_')
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addTypeVariable(leftTypeVarName)